﻿

using IotContract.Dtos.Clients;
using IotContract.Grpcs;
using IotContract.Interfaces;
using IotContract.Models;
using IotContract.Models.Clients.Hks;

namespace IotServer.Grpcs;

public class RemoteGrpcService : IRemoteGrpcService
{
    private readonly IConnectDataService _connectDataService;
    public RemoteGrpcService(IConnectDataService connectDataService)
    {
        _connectDataService = connectDataService;
    }
    public async Task<GrpcReturn<string>> CheckNGResult(HkWriteInstruct data)
    {
        return await _connectDataService.CheckNGResult(data);
    }

    public async Task<GrpcReturn<string>> CommitChargeFMTResult(ChargeTrayResult result)
    {
        return await _connectDataService.CommitChargeFMTResult(result);
    }

    public async Task<GrpcReturn<string>> CommitFireWarn(IotEquipWarnDto iotEquipWarnDto)
    {
        return await _connectDataService.CommitFireWarn(iotEquipWarnDto);
    }

    public async Task<GrpcReturn<string>> CommitFmtMove(StageMoveInstruct moveInstruct)
    {
        return await _connectDataService.CommitFmtMove(moveInstruct);
    }

    public async Task<GrpcReturn<OCVCellMain>> CommitOcvResult(OCVTrayResult data)
    {
        return await _connectDataService.CommitOcvResult(data);
    }

    public async Task<GrpcReturn<string>> CommitSelResult(HkWriteInstruct data)
    {
        return await _connectDataService.CommitSelResult(data);
    }

    public async Task<GrpcReturn<string>> GetChargeFMTData(HkWriteInstruct hkWrite)
    {
        return await _connectDataService.GetChargeFMTData(hkWrite);
    }

    public async Task<GrpcReturn<string>> GetReTestChargeFMT(HkWriteInstruct hkWrite)
    {
        return await _connectDataService.GetReTestChargeFMT(hkWrite);
    }

    public async Task<GrpcReturn<SelCellResult>> GetSelCellData(HkWriteInstruct data)
    {
        return await _connectDataService.GetSelCellData(data);
    }

    public async Task<GrpcReturn<TrayCellStatus>> GetTrayCellStatus(TrayDefineInstruct trayDefineInstruct)
    {
        return await _connectDataService.GetTrayCellStatus(trayDefineInstruct);
    }
}
